package io.renren.modules.app.controller;

import io.renren.common.result.Result;
import io.renren.modules.medical.service.HealthGuidanceService;
import io.renren.modules.medical.vo.weixinVo.ApiGuidanceListVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-05-26 22:13
 */
@RestController
@RequestMapping("/app/health/guidance")
@RequiredArgsConstructor
public class HealthGuidanceApi {

    private final HealthGuidanceService healthGuidanceService;

    /**
     * 根据用户id获取到用户健康指导集合
     */
    @GetMapping("/list")
    public Result<List<ApiGuidanceListVo>> getList(){
        List<ApiGuidanceListVo> resultList = healthGuidanceService.getList();
        return Result.success(resultList);
    }
}
